import java.io.*;

public class 二进制流 {
    public static void main(String[] args) throws IOException {
        //二进制写入();
        二进制读取();
    }

    private static void 二进制读取() throws FileNotFoundException {
        DataInputStream dis=new DataInputStream(new FileInputStream("day5//2.dat"));
    }

    private static void 二进制写入() throws IOException {
        DataOutputStream dos =new DataOutputStream(new FileOutputStream("day5//2.dat"));
        dos.writeInt(10);
        dos.writeFloat(10.f);
        dos.writeUTF("我是谁");
        dos.flush();
        dos.close();
        System.out.println("写入完毕");

    }
}
